<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <!-- 登录页面 -->
    <div class="login">
        <input class="username" /> <button class="sub">登录</button>
        <img src="./sources/login.JPG" alt="">
    </div>
    <!-- 游戏选择页面 -->
    <div class="game"></div>
    <script type="module">
        let login = document.querySelector('.login')
        let sub = document.querySelector('.sub')
        let input = document.querySelector('input[class="username"]')
        let game = document.querySelector('.game')
        sub.onclick = async function () {
            let value = input.value.trim()
            if (!value) return
            login.style.display = 'none'
            let {domRender} = await import('./js/plugins.js')
            game.appendChild(domRender(game,value))
            game.style.display = 'block'
        }
        
    </script>
</body>

</html>